package com.itheima.health.controller;



import com.itheima.health.entity.Result;
import com.itheima.health.service.SetmealService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/setmeal")
@Api(tags = "移动端套餐管理")
public class SrtmealController {

    @Reference
    private SetmealService setmealService;

    @GetMapping("findAllSetmeal")
    @ApiOperation(value = "查询所有套餐",notes = "移动端套餐列表查询")
    public Result findAllSetmeal(){
        return new Result(setmealService.list());
    }


    @GetMapping("/findSetMealDetail")
    public Result findSetMealDetail (@RequestParam("id")Integer id){

        return new Result(setmealService.findSetMealDetail(id));

    }




}
